package com.xiyan.blog.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "评论对象", description = "")
@Accessors(chain = true)
public class Comment extends BaseEntity {

    @ApiModelProperty("博客ID")
    private String blogId;

    @ApiModelProperty("评论内容")
    private String content;

    @ApiModelProperty("用户ID")
    private String userId;

    @ApiModelProperty("父评论ID")
    private String parentId;

    @ApiModelProperty("获赞数")
    private Long praiseNum;

    //  该属性不是数据库字段
    @TableField(exist = false)
    private List<Comment> childComment;
}
